package com.zdd.chap2servercors.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
//    @CrossOrigin(value = "http://localhost:8081",maxAge = 3600,allowedHeaders = "*")
    @GetMapping("/getMsg")
    public String getMsg(){
        return "GET SUCCESS";
    }

//    @CrossOrigin(value = "http://localhost:8081",maxAge = 3600,allowedHeaders = "*")
    @DeleteMapping("/delMsg")
    public String delMsg(){
        return "DELETE SUCCESS";
    }
}
